package com.navinfo.opentsp.qingqi.trackoptimize.commands;


import com.navinfo.opentsp.qingqi.trackoptimize.common.command.AbstractCommand;
import com.navinfo.opentsp.qingqi.trackoptimize.common.result.HttpCommandResultWithData;
import com.navinfo.opentsp.qingqi.trackoptimize.common.util.RegexpUtils;
import com.navinfo.opentsp.qingqi.trackoptimize.common.validation.group.GroupCommand;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 查询行程
 * create by wangshuai
 *
 */
@QingQiTrackOptimize
public class QueryTripDetailCommand extends AbstractCommand<HttpCommandResultWithData> {

    @NotNull(message = "行程ID不能为空", groups = {GroupCommand.class})
    @NotBlank(message = "行程ID不能为空", groups = {GroupCommand.class})
    private String tripId;


    @Pattern(message = "行程时间tripDate格式不合法", regexp = RegexpUtils.DATE_BARS_DAY_REGEXP, groups = {GroupCommand.class})
    private String tripDate;

    public String getTripId() {
        return tripId;
    }

    public void setTripId(String tripId) {
        this.tripId = tripId;
    }

    public String getTripDate() {
        return tripDate;
    }

    public void setTripDate(String tripDate) {
        this.tripDate = tripDate;
    }

    public Class<? extends HttpCommandResultWithData> getResultType() {
        return HttpCommandResultWithData.class;
    }

    @Override
    public String toString() {
        return "QueryTripDetailCommand{" +
                "tripId='" + tripId + '\'' +
                "tripDate='" + tripDate + '\'' +
                '}';
    }
}